package com.woniuxy02;

/**
 * @author 作者
 * @create 2025-07-24 14:10
 */
public class Test02 {
    public static void main(String[] args) {
        Book book1 = new Book("ISBN12345","book1",20);
        Book book2 = new Book("ISBN12345","book1",20);
        System.out.println(book1.equals(book2));
    }

    private static void test01() {
        Student s1=new Student(1,"zs",11);
        Student s2=new Student(2,"ls",12);
        Student s3=new Student(3,"zs",13);
        Student s4=new Student(1,"zs",11);
        //String s1="aaa",s2="aaa";
        //s1==s2  s1.equals(s2)
//        s1=s2;
        System.out.println(s1==s2);
        System.out.println(s1==s3);
        System.out.println(s1==s4);
        System.out.println("------------");
        System.out.println(s1.equals(s2));
        System.out.println(s1.equals(s3));
        System.out.println(s1.equals(s4));
        System.out.println(s1.equals(new Benz()));
    }
}
